//
//  UITableViewController+RemoveAVPlayer.m
//  News
//
//  Created by xalo on 16/3/2.
//  Copyright © 2016年 News. All rights reserved.
//

#import "UITableViewController+RemoveAVPlayer.h"

@implementation UITableViewController (RemoveAVPlayer)
-(void)awakeFromNib
{
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(removeAVPlayer) name:@"remove" object:nil];

    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(statusBarOrientationChange:) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
    
    
    
    
}

-(void)removeAVPlayer
{



}

- (void)statusBarOrientationChange:(NSNotification *)notification
{
    
    
}

- (NSInteger)tableViewDisPlayImage:(UIImage *)image title:(NSString *)title bySourceDataCount:(NSInteger)count
{

    
    if (count == 0) {
        
        UIImageView *imageView = [[UIImageView alloc]initWithImage:image];
        imageView.frame = CGRectMake(0, 0, 300,300);
        
        imageView.center = self.tableView.center;
        UILabel *titleLabel = [[UILabel alloc]init];
        titleLabel.frame = CGRectMake(0, 0, 300, 30);
        titleLabel.center = imageView.center;
        titleLabel.text = title;
        
        titleLabel.textAlignment = NSTextAlignmentCenter;
        [imageView addSubview:titleLabel];
        
        self.tableView.backgroundView = imageView;
        
    }
      return count;
}






@end
